home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 July / EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso / earcd / biz / swood / fw_font.lha / FW_Font / FontLook-Auto.fwrexx.long < prev    next >
Text File  |  1997-04-27  |  7KB  |  294 lines

  1. /* Hiermit erhält man eine Übersicht über seine gesamten Zeichensätze*/
  2. /* © Heiko Schröder / 27.04.97 / Mail: age@thepentagon.com */
  3. R='0A'X
  4.  
  5. Address='FinalW'
  6. Options results
  7.  
  8. STATUS PORTNAME
  9. FW = result
  10. address = FW
  11.  
  12. SIGNAL ON BREAK_C
  13.  
  14. 'ShowMessage 2 0 "FontLook - Auto V2.72 - 27.04.97" "    Neu: Das Shareware-Paket" "Info im FontLook-Auto-Guide" ":-)" "Ok" "(-:"'
  15. 'ShowMessage 1 1 "A C H T U N G !" "Das Makro benötigt ein leeres Dokument." "Ihr jetziges Dokument wird gelöscht!" "Ja" "Abbruch" ""'
  16. if result=2 then call BREAK_C
  17. Cleardoc Force
  18.  
  19. 'ShowMessage 2 0 "Codes oder Layout" "" "" "Codes" "Layout" ""'
  20. cl=result
  21.  
  22. 'ShowMessage 2 0 "Wie soll die" "Bilschirmausgabe erfolgen?" "" "Normal" "Speed" ""'
  23. ba=result
  24.  
  25. /*----- REXXREQTOOLS -----*/
  26.  
  27. Temp="ram:fonts"
  28. if ~show('L',"rexxreqtools.library") then do
  29.    if ~addlib('rexxreqtools.library',0,-30,0) then do
  30.       'ShowMessage 1 1 "Fehler...." "Benötige RexxReqTools.library" " A B B R U C H ! !" "Okay" "" ""'
  31.       exit
  32.    end
  33. end
  34.  
  35. dir=rtfilerequest("FWFonts/SWOLFonts/",,"Verzeichnis auswählen...",,"rt_pubscrname=FinalWriterPubScreen rtfi_flags = freqf_nofiles")
  36. if dir="" then do
  37.    'ShowMessage 1 1 "Kein Verzeichnis ausgewählt!" "   A B B R U C H ! !" "" "Okay" "" ""'
  38.    exit
  39. end
  40. dir=d2c(34)||dir||d2c(34)
  41. address command 'list ' dir || ' to=' Temp || ' files lformat "%s%s"'
  42.  
  43. If OPEN('file',Temp,"R") then
  44. If Seek("file",0,"E")=0 then do
  45.    'ShowMessage 1 1 "Verzeichnis ist leer" " A B B R U C H ! !" "" "Okay" "" ""'
  46.    address "REXX"
  47.    close("file")
  48.    EXIT
  49. end
  50.  
  51. address "REXX"
  52. close("file")
  53. address command 'sort ' Temp Temp
  54. OPEN('file',Temp, "R")
  55.  
  56. address(FW)
  57. 'ShowMessage 1 0 "Benötigen Sie Locher-Marken?" "" "" "Ja" "Nein" ""'
  58. lm=result
  59. 'ShowMessage 1 0 "Wie geht es weiter?" "" "" "Speichern" "Speichern & Drucken" "Drucken"'
  60. wgw=result
  61.  
  62.  
  63. /*----- Schleife bis alle Fonts ausgegeben worden sind -----*/
  64.  
  65. DO WHILE 1
  66.    FontName=ReadLn('file')
  67.     IF EOF('file') THEN do
  68.       address "REXX"
  69.       close('file')
  70.       call Ende
  71.    End
  72.  
  73.    /*FensterMinimierung*/
  74.    IF ba=2 THEN DO
  75.       status WINDOW
  76.       parse VAR result links oben width height minwidth minheight maxwidth maxheight
  77.       sizewindow minwidth minheight
  78.    End
  79.  
  80.    GetDocItemPrefs Decimal
  81.    Punkt=Result
  82.    If Punkt="Comma" then DocItemPrefs Decimal Period
  83.  
  84.    TextTool
  85.    Font FontName
  86.    a=RC
  87.    If a=0 then do                  /* Kann FW den Font verarbeiten?*/
  88.  
  89.       Type d2c(32)
  90.       BackSpace
  91.       status FontPath
  92.       FullFontName=result
  93.       pos = max(index(FullFontName,':'),lastpos('/',FullFontName))
  94.       IF (pos~=0) THEN
  95.          FontName=RIGHT(FullFontName, LENGTH(FullFontName)-pos)
  96.       END
  97.  
  98.       IF ba=2 THEN View 20
  99.  
  100.       Pagesetup Pagetype A4 Orient Tall Pages RightOnly Top 0 Bottom 2.54 Left 0 Right 0
  101.       SectionSetup Top 2.54 Bottom 2.54 Inside 2 Outside 1
  102.  
  103.       GraphicTool
  104.       LinePrefs LineWt .5
  105.       DrawLine 1 2 3.5 20 3.5
  106.       DrawLine 1 2 26 20 26
  107.  
  108.       If lm=1 then DrawLine 1 .5 14.85 1 14.85
  109.  
  110.       TextTool
  111.       If cl=1 then do
  112.  
  113.          Do i=0 to 13
  114.             SetTab i*1.3+0.8 Right
  115.          End
  116.  
  117.          NameFont="FWDocs/Codes-" || FontName
  118.          Justify Center
  119.          Font Softsans
  120.          FontSize 18
  121.          Type FontName||R||R
  122.  
  123.          a=0
  124.  
  125.          DO w=1 to 15
  126.  
  127.             Font Softsans
  128.             FontSize 8
  129.             DO x=a+33 to a+46
  130.                 Type d2c(9) || x || d2c(32) || d2c(x)
  131.             END
  132.  
  133.             Type R
  134.  
  135.             Font FontName
  136.             FontSize 24
  137.             DO x=a+33 to a+46
  138.                 Type d2c(9)
  139.                Type d2c(x)
  140.             END
  141.  
  142.             Type R
  143.  
  144.             a=a+14
  145.  
  146.          END
  147.  
  148.          Font Softsans
  149.          FontSize 8
  150.          DO x=a+33 to a+45
  151.              Type d2c(9) || x || d2c(32) || d2c(x)
  152.          END
  153.  
  154.          Type d2c(9)||R
  155.  
  156.          Font FontName
  157.          FontSize 24
  158.          DO x=a+33 to a+45
  159.              Type d2c(9)
  160.             Type d2c(x)
  161.          END
  162.          Type d2c(9)||R
  163.          FontSize 12
  164.          Type d2c(9)||R
  165.          Font Softsans
  166.  
  167.          FontSize 8
  168.          Justify Right
  169.          Type Date(E)" - "FullFontName
  170.  
  171.       END
  172.  
  173.       If cl=2 then do
  174.  
  175.          Justify Center
  176.          NameFont="FWDocs/Layout-" || FontName
  177.          Font Softsans
  178.          FontSize 18
  179.          Type FontName||R
  180.  
  181.          Justify Left
  182.          Font FontName
  183.          FontSize 8
  184.          Type R||"This is 8-point type - not easy to read!"||R
  185.  
  186.          FontSize 9
  187.          Type "9-Point type is about the smallest readable size."||R
  188.  
  189.          FontSize 10
  190.          Type "With 10-point type, we have a normal text size."||R
  191.  
  192.          FontSize 12
  193.          Type "With some Fonts, 12-point type is easier to read."||R
  194.  
  195.          FontSize 14
  196.          Type "14-point type is good for subheadings."||R
  197.  
  198.          FontSize 16
  199.          Type "For larger subheadings, try 16-point type."||R
  200.  
  201.          FontSize 18
  202.          Type "18-point type makes nice small headlines."||R
  203.  
  204.          FontSize 24
  205.          Type "24-point type is for medium headlines."||R
  206.  
  207.          FontSize 36
  208.          Type "36-point is for larger ones."||R
  209.  
  210.          FontSize 48
  211.          Type "48-point almost shouts!"||R||R
  212.  
  213.          FontSize 12
  214.          Font SoftSans
  215.          Type "NORMAL"||R
  216.  
  217.          FontSize 10
  218.          Font FontName
  219.          Type "ABCDEFGHIJKLMNOPQRSTUVWXYZ"||R
  220.          Type "abcdefghijklmnopqrstuvwxyz 1234567890 !@#$%^&*()-+=[]{}/:;,.?"||R
  221.          Type "The quick brown fox jumps over the lazy dog. ÄÖÜäöüß"||R||R||R
  222.  
  223.          Font SoftSans
  224.          Type "ERWEITERTER SCHRIFTCODE"||R
  225.  
  226.          FontSize 10
  227.          Font FontName
  228.          j=0
  229.          Do i=1 to 4
  230.             Do k=128+j to 159+j
  231.                Type d2c(k)
  232.             End
  233.             Type R
  234.             j=j+32
  235.          End
  236.          Status BodyTextHeight
  237.          th=result
  238.          FG=26.24-2.113-th
  239.          FG=Trunc(FG*8/0.34)
  240.          FontSize FG
  241.          Type d2c(9)
  242.          Font SoftSans
  243.          FontSize 8
  244.          Type R
  245.          Justify Right
  246.          Type Date(E)" - "FullFontName
  247.       End
  248.  
  249.       call WH
  250.  
  251.    /* Nur Speichern */
  252.       If wgw~=3 then 
  253.          Save NameFont
  254.  
  255.       /* Speichern+Drucken */
  256.       If wgw=2 then 
  257.          Print
  258.  
  259.       /* Nur Drucken */
  260.       If wgw=3 then
  261.          Print
  262.  
  263.       Cleardoc force
  264.    END
  265.    else do
  266.       call WH
  267.       'ShowMessage 1 1 "FW kann diesen Font nicht anzeigen..." "Es ist kein FW typischer Font..." "" "Okay" "" ""'
  268.    end
  269. END
  270.  
  271. Ende:
  272.    Address(FW)
  273.    If cl=1 then 'ShowMessage 2 1 "Die Dokumente sind im FWDocs-Drawer" "zu finden. Erkennbar am «Codes-.....«" "Vielen Dank für die Benutzung." "@-`-" "Bitte" ":-))"'
  274.    If cl=2 then 'ShowMessage 2 1 "Die Dokumente sind im FWDocs-Drawer" "zu finden. Erkennbar am «Layout-.....«" "Vielen Dank für die Benutzung." "@-`-" "Bitte" ":-))"'
  275.    'ShowMessage 2 1 "© Heiko Schröder" "email: age@thepentagon.com" "http://yi.com/home/SchroederHeiko" "Oki" "Doki" ":-))"'
  276.    Address command "delete ram:fonts QUIET"
  277.    EXIT
  278.  
  279. BREAK_C:
  280.    'ShowMessage 1 1 "Makro-Abbruch..." "" "" "Ich weiß..." "" ""'
  281.    call WH
  282.    address "REXX"
  283.    CLOSE("file")
  284.    Address command "delete ram:fonts QUIET"
  285.    EXIT
  286.  
  287. WH:
  288.    If ba=2 then do
  289.       View
  290.       sizewindow width height
  291.    End
  292.    If Punkt="Comma" then DocItemPrefs DECIMAL Comma
  293. Return
  294.